import { SupplierRequest, Request } from '@/plugins/supplier-request'
import { SUPPLIER_POTENTIAL_PATH, EXPORT_PATH } from './../constans'

// 供应商管理 - 潜在供应商 - 列表查询
export const queryPotentialSupplierListService = (data, loadingFn) => SupplierRequest({
  url: `${SUPPLIER_POTENTIAL_PATH}/list`,
  type: 'post',
  data,
  loadingFn
});

// 供应商管理 - 潜在供应商 - 导出文件
export const exportPotentialSupplierFileService = (data, loadingFn) => SupplierRequest({
  url: `${EXPORT_PATH}/export-potential-query`,
  type: 'get',
  data,
  loadingFn,
  isExport: true
});

// 供应商管理 - 潜在供应商 - 暂存供应商
export const stagingPotentialSupplier = (data) => {
  return Request(`${SUPPLIER_POTENTIAL_PATH}/staging-supplier`, 'post', data)
}
